home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
tutor
/
dosguide.exe
/
HELPDOS.ZIP
/
SHIFT.HLP
< prev
next >
Wrap
Text File
|
1985-09-03
|
1KB
|
46 lines
--------------------- SHIFT - Internal Batch Subcommand ----------------------
SHIFT allows a batch file to make use of more than ten replaceable parameters
entered on the command line.
FORMAT: SHIFT
REMARKS:
There are ten replaceable parameters, numbered %0 - %9. More than ten
parameters may be used by "shifting" them. SHIFT moves each parameter on
the command line one position to the left, so that %0 becomes %1, %1 becomes
%2, and so on. Subsequent SHIFTs continue to move parameters one position
lower.
EXAMPLE:
The following batch file, ECHOIT.BAT, echoes (displays) the values of
replaceable parameters, SHIFTs them, and echoes their values again. The default
drive is A:
ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
SHIFT
ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
SHIFT
ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
Invoking the batch file with:
ECHOIT 1 2 3 4 5 6 7 8 9 10 11
produces:
A>ECHO ECHOIT 1 2 3 4 5 6 7 8 9
ECHOIT 1 2 3 4 5 6 7 8 9
A>SHIFT
A>ECHO 1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
A>SHIFT
A>ECHO 2 3 4 5 6 7 8 9 10 11
2 3 4 5 6 7 8 9 10 11